package com.letchat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.letchat.pojo.CommentChild;
import com.letchat.pojo.CommentParent;
import com.letchat.pojo.Subject;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SubjectMapper extends BaseMapper<CommentParent> {
    @Select("select * from subject where id = #{id}")
    Subject getSubjectById(Integer id);

    List<Subject> subjectList(String subject);

    @Delete("delete from subject where id = #{id}")
    void deleteSubjectById(Integer id);
}
